home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PCASM1.ZIP / TASM.DOC < prev    next >
Text File  |  1990-08-10  |  4KB  |  125 lines

  1.  
  2.  
  3.  
  4.                                                                              1
  5.  
  6.                                      USING TASM
  7.  
  8.  
  9.              This is absolutely the easiest chapter in the book. The default
  10.              mode for TASM is something called MASM mode. It imitates what
  11.              MASM does, warts and all. When you are finished with the Tutor,
  12.              you can decide whether you want to use "IDEAL" mode. 
  13.  
  14.              The following are the minor differences from MASM.
  15.  
  16.  
  17.              ===== CHAPTER 1
  18.  
  19.              To assemble the file myprog.asm use:
  20.  
  21.                  >tasm myprog
  22.  
  23.              You don't need commas or semicolons or anything. Then if you are
  24.              using TLINK, use:
  25.  
  26.                  >tlink myprog+\asmhelp
  27.  
  28.              The batch file for this would be:
  29.  
  30.                  >tlink %1+\asmhelp
  31.  
  32.              No commas or semicolons.
  33.  
  34.  
  35.              ===== CHAPTER 10 
  36.  
  37.              To get your list file put three commas after the filename:
  38.  
  39.                  .tasm myprog, , ,
  40.  
  41.              This will produce MYPROG.LST. You will notice that the list
  42.              files look similar.
  43.  
  44.              Page 94 - This is the TURBO listing for variable2:
  45.  
  46.                   42 000E  8E C0               mov   es,ax
  47.                   43
  48.                   44 0010  26: 8B 0E 0000r     mov   cx, variable2
  49.                   45 0015  26: 89 0E 0000r     mov   variable2, cx
  50.                   46
  51.                   47 001A  CB                            ret
  52.  
  53.  
  54.              This is the TURBO listing for variable3:
  55.  
  56.                   42 000E  8E C0               mov   es,ax
  57.                   43
  58.                   44 0010  2E: 8B 0E 0000r     mov   cx, variable3
  59.                   45 0015  2E: 89 0E 0000r     mov   variable3, cx
  60.                   46
  61.                   47 001A  CB                            ret
  62.                   48
  63.  
  64.  
  65.  
  66.  
  67.  
  68.              The PC Assembler Tutor                                          2
  69.              ______________________
  70.  
  71.  
  72.              This is the TURBO listing for variable4:
  73.  
  74.                   42 000E  8E C0               mov   es,ax
  75.                   43
  76.                   44 0010  36: 8B 0E 0000r     mov   cx, variable4
  77.                   45 0015  36: 89 0E 0000r     mov   variable4, cx
  78.                   46
  79.                   47 001A  CB                            ret
  80.                   48
  81.  
  82.  
  83.              Except for the line numbers at the left, they look exactly the
  84.              same as what is in the text. TASM is calculating the segment
  85.              overrides.
  86.  
  87.  
  88.              PAGE 99 - This is the TURBO listing for calls similar to the ones
  89.              on page 99:
  90.  
  91.                   89 0AFF  E8 FEC8            call    near_routine 
  92.                   90 0B02  9A 00000AF6sr      call    far_routine 
  93.                   91 0B07  E8 0000e           call    near_external_routine 
  94.                   92 0B0A  9A 00000000se      call    far_external_routine 
  95.                   93 0B0F  E8 0000e           call    get_unsigned 
  96.  
  97.              and here is the MASM output for the same file:
  98.  
  99.                  0AFF  E8 09CA R             call    near_routine 
  100.                  0B02  9A 0AF6 ---- R        call    far_routine 
  101.                  0B07  E8 0000 E             call    near_external_routine 
  102.                  0B0A  9A 0000 ---- E        call    far_external_routine 
  103.                  0B0F  E8 0000 E             call    get_unsigned 
  104.  
  105.              Why is that first number different (FEC8 vs. 09CA)? Turbo knows
  106.              the correct value so it is inserting it into the code. MASM is
  107.              passing the information on to the linker for calculation. The
  108.              first way makes the linking faster. 
  109.  
  110.              Some of these numbers are reversed for display purposes. The
  111.              actual code is the same. 
  112.  
  113.  
  114.              ===== CHAPTER 21
  115.  
  116.              You don't need to use EXE2BIN after TLINK. TLINK will make a .COM
  117.              file (if possible) from object files if you use the /t option
  118.              with the following commands:
  119.  
  120.                  >tlink /t  myprog
  121.                  >tlink /t prog1+prog2+prog3
  122.  
  123.              you will get .COM files as output.
  124.  
  125.